package com.hxl.linuxfilemanager.util;

import org.springframework.util.DigestUtils;

public class StringUtils {
    public static boolean isNotEmpty(String data){
        return !isEmpty(data);
    }
    public static boolean isEmpty(String data){
        return data==null|| data.length()==0;
    }


    public static String md5Str(String string){
        return  DigestUtils.md5DigestAsHex(string.getBytes());
    }

    public static boolean isExist(String[] tag,String value){
        for (String s : tag) {
            if (s.equalsIgnoreCase(value)){
                return true;
            }
        }
        return false;
    }
}
